package my.soft.aiteacher.teacher.controller;


import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import my.soft.aiteacher.teacher.pojo.ConceptExampleVo;
import my.soft.aiteacher.teacher.pojo.conceptExampleType.ConceptExample;
import my.soft.aiteacher.teacher.service.IConceptExampleService;
import my.soft.aiteacher.utils.R;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 概念解析 前端控制器
 * </p>
 *
 * @author GMCX
 * @since 2025-06-05
 */
@RestController

@Tag(name = "教师-概念解析管理", description = "教师-概念解析管理")
@RequestMapping("/concept/example")
public class ConceptExampleController {
    @Resource
    private IConceptExampleService conceptExampleService;

    @Operation(summary = "上传", description = "上传")
    @PreAuthorize("hasAnyAuthority('upload:conceptExample')")
    @RequestMapping(value = "/upload",method = RequestMethod.POST)
    public R upload(@RequestBody List<ConceptExample> conceptExampleVo){
        conceptExampleService.upload(conceptExampleVo);
        return R.success("ok");
    }

}
